﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ValidateCard.aspx.cs" Inherits="WebSite.cn.ValidateCard" %>


<%@ Register Src="head.ascx" TagName="head" TagPrefix="uc1" %>
<%@ Register Src="bottom.ascx" TagName="bottom" TagPrefix="uc3" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title><%=WebSite.info.info1("", "shoptitle")%></title>
    <meta name="Description" content="<%=WebSite.info.info1("","shopcontent")%>" /> 
    <meta name="Keywords" content="<%=WebSite.info.info1("","shopkey")%>" />

<link href="/cn/css/idialog.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="/js/jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="/js/1store.js"></script>
<script type="text/javascript" src="/js/artDialog.js"></script>
<script type="text/javascript" src="/js/iframeTools.source.js"></script>
<script type="text/javascript" src="/js/art_dialog.js"></script>

    <script language="javascript" type="text/javascript">


        ////////////////////////////会员登录//////////////////////////////////////
        $(function () {
            $("#txtCardCode").blur(function () {
                if ($("#txtCardCode").val() == "") {
                    $("#spCardCode").html("<img src=\"/cn/images/wrong.gif\" /> 请输入卡号！");
                }
                else $("#spUserName").html("<img src=\"/cn/images/right.gif\"/>");
                return false;
            });
            $("#txtPassword").blur(function () {
                if ($("#txtPassword").val() == "") {
                    $("#spPassword").html("<img src=\"/cn/images/wrong.gif\" /> 请输入密码！");
                } else $("#spPassword").html("<img src=\"/cn/images/right.gif\"/>");
                return false;
            });
            $("#txtValidate").blur(function () {
                if ($("#txtValidate").val() == "") {
                    $("#spValidate").html("<img src=\"/cn/images/wrong.gif\" /> 请输入验证码！");
                } else $("#spValidate").html("<img src=\"/cn/images/right.gif\"/>");
                return false;
            });


        });

        function checkValidateForm() {
          
                if ($("#txtCardCode").val() == "") {
                    $("#spCardCode").html("<img src=\"/cn/images/wrong.gif\" /> 请输入卡号！");
                    return false;
                }
                else $("#spUserName").html("<img src=\"/cn/images/right.gif\"/>");
               
         
                if ($("#txtPassword").val() == "") {
                    $("#spPassword").html("<img src=\"/cn/images/wrong.gif\" /> 请输入密码！");
                    return false;
                } else $("#spPassword").html("<img src=\"/cn/images/right.gif\"/>");
               


                if ($("#txtValidate").val() == "") {
                    $("#spValidate").html("<img src=\"/cn/images/wrong.gif\" /> 请输入验证码！");
                    return false;
                } else $("#spValidate").html("<img src=\"/cn/images/right.gif\"/>");
             

            return true;
        }



        function cleatText() {

                document.getElementById('<%= txtCardCode.ClientID %>').value = "";
                document.getElementById('<%= txtPassword.ClientID %>').value = "";
                document.getElementById('<%= txtValidate.ClientID %>').value = "";
                document.getElementById('<%= lblMessage.ClientID %>').value = "";
                return false;
               
        }

    </script>

</head>
<body class="body">


	<uc1:head ID="head_1" runat="server" />

      <center>
         <div id="container">
   	<form id="form1" runat="server">
             
      <br />
      <div >
        <table border="0" cellpadding="0" cellspacing="1"    style="width: 600px; ">
          <tr>
            <td height="28" align="left"><strong  class="newslist_title">请输入您的礼品卡(券)号与密码</strong></td>
          </tr>
          <tr>
            <td height="120" align="center" >
            <table border="0" cellspacing="0" cellpadding="0"  style="width: 97%;" >
          
              <tr>
                <td width="30%" height="28" align="right">卡　号：</td>
                <td width="200px" align="left">　
                   <input type="text" runat="server" maxlength="30"   id="txtCardCode" name="txtCardCode" />
                  </td>
                  <td style=" text-align:left;" ><span id="spCardCode">*</span></td>
              </tr>
              <tr >
                <td height="28" align="right" >密　码：</td>
                <td align="left">　
                 <input type="password" runat="server"  maxlength="20"  id="txtPassword" name="txtPassword" />
                   
                    </td>
                                      <td style=" text-align:left;"><span id="spPassword">*</span></td>
              </tr>
                <tr>
                <td height="28" align="right" >验证码：</td>
                <td align="left">　
                 <input type="text" runat="server"  maxlength="6" size="10"  id="txtValidate" name="txtValidate" />

                  <img id="imgCheckCode" src="/admin/checkCode.aspx" alt="看不清楚,换一张" onclick="this.src = this.src + '?' + new Date().getTime();" class="imgCode" />
                  
                    </td>
                    <td style=" text-align:left;"><span id="spValidate">*</span></td>
              </tr>
              
              <tr >
                <td height="28" colspan="3" align="center" >
  
                   <asp:Button ID="btnSubmit"  class="button" runat="server"  Text="提 交" OnClientClick="return checkValidateForm();" onclick="txtSubmit_Click"></asp:Button>
                  &nbsp;
                   <asp:Button ID="btnReset" class="button" runat="server"  Text="重 置" 
                         OnClientClick="return cleatText()"></asp:Button>
                         </td>
                
              </tr>
             <tr>
                <td height="28" colspan="3" align="center" >
                    <asp:Label ID="lblMessage" runat="server"></asp:Label>
                  </td>
              </tr>
            </table></td>
          </tr>
        </table>
        <br />
        <br />
      </div>

<%--     <div id="divErrorMessage" runat="server" style="display:none; background-color:#eee;">
               <div style="font-size:14px; font-weight:bold; text-align:left; padding-left:20px; margin-top:10px;">
               <img src="../images/error.png" alt="" />
              <div style="margin-top:-20px; margin-left:60px;"> 错误信息：</div></div>
               <div id="divErrorContent" runat="server" style="color:Red; font-weight:bold; font-size:16px; margin-top:30px;"></div>
            </div>
--%>
           
    </form>

  
    </div> 
          </center>
	
<%--<script language="javascript" type="text/javascript">

    setInterval("setHidErrorMessage()", 2000);
</script>--%>
     <uc3:bottom ID="bottom_1" runat="server" />
</body>
</html>
